3.1.24 \(\int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx\) [24]

3.1.24.1 Optimal result
3.1.24.2 Mathematica [A] (verified)
3.1.24.3 Rubi [A] (verified)
3.1.24.4 Maple [C] (verified)
3.1.24.5 Fricas [A] (verification not implemented)
3.1.24.6 Sympy [F]
3.1.24.7 Maxima [B] (verification not implemented)
3.1.24.8 Giac [A] (verification not implemented)
3.1.24.9 Mupad [B] (verification not implemented)

3.1.24.1 Optimal result

Integrand size = 32, antiderivative size = 100 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=\frac {5 a^3 c^3 \text {arctanh}(\sin (e+f x))}{16 f}-\frac {5 a^3 c^3 \sec (e+f x) \tan (e+f x)}{16 f}+\frac {5 a^3 c^3 \sec (e+f x) \tan ^3(e+f x)}{24 f}-\frac {a^3 c^3 \sec (e+f x) \tan ^5(e+f x)}{6 f} \]

output
5/16*a^3*c^3*arctanh(sin(f*x+e))/f-5/16*a^3*c^3*sec(f*x+e)*tan(f*x+e)/f+5/ 
24*a^3*c^3*sec(f*x+e)*tan(f*x+e)^3/f-1/6*a^3*c^3*sec(f*x+e)*tan(f*x+e)^5/f
 
3.1.24.2 Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.25 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=-a^3 c^3 \left (-\frac {5 \text {arctanh}(\sin (e+f x))}{16 f}-\frac {5 \sec (e+f x) \tan (e+f x)}{16 f}-\frac {5 \sec ^3(e+f x) \tan (e+f x)}{24 f}+\frac {5 \sec ^5(e+f x) \tan (e+f x)}{6 f}-\frac {5 \sec ^3(e+f x) \tan ^3(e+f x)}{3 f}+\frac {\sec (e+f x) \tan ^5(e+f x)}{f}\right ) \]

input
Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])^3*(c - c*Sec[e + f*x])^3,x]
 
output
-(a^3*c^3*((-5*ArcTanh[Sin[e + f*x]])/(16*f) - (5*Sec[e + f*x]*Tan[e + f*x 
])/(16*f) - (5*Sec[e + f*x]^3*Tan[e + f*x])/(24*f) + (5*Sec[e + f*x]^5*Tan 
[e + f*x])/(6*f) - (5*Sec[e + f*x]^3*Tan[e + f*x]^3)/(3*f) + (Sec[e + f*x] 
*Tan[e + f*x]^5)/f))
 
3.1.24.3 Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.94, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {3042, 4446, 3042, 3091, 3042, 3091, 3042, 3091, 3042, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sec (e+f x) (a \sec (e+f x)+a)^3 (c-c \sec (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^3 \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3dx\)

\(\Big \downarrow \) 4446

\(\displaystyle -a^3 c^3 \int \sec (e+f x) \tan ^6(e+f x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 c^3 \int \sec (e+f x) \tan (e+f x)^6dx\)

\(\Big \downarrow \) 3091

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \int \sec (e+f x) \tan ^4(e+f x)dx\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \int \sec (e+f x) \tan (e+f x)^4dx\right )\)

\(\Big \downarrow \) 3091

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \left (\frac {\tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3}{4} \int \sec (e+f x) \tan ^2(e+f x)dx\right )\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \left (\frac {\tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3}{4} \int \sec (e+f x) \tan (e+f x)^2dx\right )\right )\)

\(\Big \downarrow \) 3091

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \left (\frac {\tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3}{4} \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {1}{2} \int \sec (e+f x)dx\right )\right )\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \left (\frac {\tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3}{4} \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {1}{2} \int \csc \left (e+f x+\frac {\pi }{2}\right )dx\right )\right )\right )\)

\(\Big \downarrow \) 4257

\(\displaystyle -a^3 c^3 \left (\frac {\tan ^5(e+f x) \sec (e+f x)}{6 f}-\frac {5}{6} \left (\frac {\tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3}{4} \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {\text {arctanh}(\sin (e+f x))}{2 f}\right )\right )\right )\)

input
Int[Sec[e + f*x]*(a + a*Sec[e + f*x])^3*(c - c*Sec[e + f*x])^3,x]
 
output
-(a^3*c^3*((Sec[e + f*x]*Tan[e + f*x]^5)/(6*f) - (5*((Sec[e + f*x]*Tan[e + 
 f*x]^3)/(4*f) - (3*(-1/2*ArcTanh[Sin[e + f*x]]/f + (Sec[e + f*x]*Tan[e + 
f*x])/(2*f)))/4))/6))
 

3.1.24.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3091
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m 
 + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1))   Int[(a*Sec[e + f*x])^m*( 
b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & 
& NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 

rule 4446
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(c 
sc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m 
Int[ExpandTrig[csc[e + f*x]*cot[e + f*x]^(2*m), (c + d*csc[e + f*x])^(n - m 
), x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[b*c + a*d, 0] && Eq 
Q[a^2 - b^2, 0] && IntegersQ[m, n] && GeQ[n - m, 0] && GtQ[m*n, 0]
 
3.1.24.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 3.91 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.42

method result size
risch \(\frac {i a^{3} c^{3} \left (33 \,{\mathrm e}^{11 i \left (f x +e \right )}-5 \,{\mathrm e}^{9 i \left (f x +e \right )}+90 \,{\mathrm e}^{7 i \left (f x +e \right )}-90 \,{\mathrm e}^{5 i \left (f x +e \right )}+5 \,{\mathrm e}^{3 i \left (f x +e \right )}-33 \,{\mathrm e}^{i \left (f x +e \right )}\right )}{24 f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{6}}-\frac {5 c^{3} a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{16 f}+\frac {5 c^{3} a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{16 f}\) \(142\)
parallelrisch \(\frac {5 a^{3} c^{3} \left (\left (-\frac {45 \cos \left (2 f x +2 e \right )}{2}-9 \cos \left (4 f x +4 e \right )-\frac {3 \cos \left (6 f x +6 e \right )}{2}-15\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+\left (\frac {3 \cos \left (6 f x +6 e \right )}{2}+9 \cos \left (4 f x +4 e \right )+\frac {45 \cos \left (2 f x +2 e \right )}{2}+15\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\sin \left (3 f x +3 e \right )-\frac {33 \sin \left (5 f x +5 e \right )}{5}-18 \sin \left (f x +e \right )\right )}{24 f \left (6 \cos \left (4 f x +4 e \right )+10+15 \cos \left (2 f x +2 e \right )+\cos \left (6 f x +6 e \right )\right )}\) \(172\)
derivativedivides \(\frac {-c^{3} a^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{5}}{6}-\frac {5 \sec \left (f x +e \right )^{3}}{24}-\frac {5 \sec \left (f x +e \right )}{16}\right ) \tan \left (f x +e \right )+\frac {5 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{16}\right )+3 c^{3} a^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-3 c^{3} a^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )+c^{3} a^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) \(180\)
default \(\frac {-c^{3} a^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{5}}{6}-\frac {5 \sec \left (f x +e \right )^{3}}{24}-\frac {5 \sec \left (f x +e \right )}{16}\right ) \tan \left (f x +e \right )+\frac {5 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{16}\right )+3 c^{3} a^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-3 c^{3} a^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )+c^{3} a^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) \(180\)
parts \(\frac {c^{3} a^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}-\frac {3 c^{3} a^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}+\frac {3 c^{3} a^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}-\frac {c^{3} a^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{5}}{6}-\frac {5 \sec \left (f x +e \right )^{3}}{24}-\frac {5 \sec \left (f x +e \right )}{16}\right ) \tan \left (f x +e \right )+\frac {5 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{16}\right )}{f}\) \(188\)
norman \(\frac {-\frac {5 c^{3} a^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{8 f}+\frac {85 c^{3} a^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{24 f}-\frac {33 c^{3} a^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{4 f}-\frac {33 c^{3} a^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{4 f}+\frac {85 c^{3} a^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{24 f}-\frac {5 c^{3} a^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{11}}{8 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{6}}-\frac {5 c^{3} a^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16 f}+\frac {5 c^{3} a^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16 f}\) \(195\)

input
int(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^3,x,method=_RETURNVERBO 
SE)
 
output
1/24*I*a^3*c^3/f/(1+exp(2*I*(f*x+e)))^6*(33*exp(11*I*(f*x+e))-5*exp(9*I*(f 
*x+e))+90*exp(7*I*(f*x+e))-90*exp(5*I*(f*x+e))+5*exp(3*I*(f*x+e))-33*exp(I 
*(f*x+e)))-5/16*c^3*a^3/f*ln(exp(I*(f*x+e))-I)+5/16*c^3*a^3/f*ln(exp(I*(f* 
x+e))+I)
 
3.1.24.5 Fricas [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.15 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=\frac {15 \, a^{3} c^{3} \cos \left (f x + e\right )^{6} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, a^{3} c^{3} \cos \left (f x + e\right )^{6} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (33 \, a^{3} c^{3} \cos \left (f x + e\right )^{4} - 26 \, a^{3} c^{3} \cos \left (f x + e\right )^{2} + 8 \, a^{3} c^{3}\right )} \sin \left (f x + e\right )}{96 \, f \cos \left (f x + e\right )^{6}} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^3,x, algorithm="f 
ricas")
 
output
1/96*(15*a^3*c^3*cos(f*x + e)^6*log(sin(f*x + e) + 1) - 15*a^3*c^3*cos(f*x 
 + e)^6*log(-sin(f*x + e) + 1) - 2*(33*a^3*c^3*cos(f*x + e)^4 - 26*a^3*c^3 
*cos(f*x + e)^2 + 8*a^3*c^3)*sin(f*x + e))/(f*cos(f*x + e)^6)
 
3.1.24.6 Sympy [F]

\[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=- a^{3} c^{3} \left (\int \left (- \sec {\left (e + f x \right )}\right )\, dx + \int 3 \sec ^{3}{\left (e + f x \right )}\, dx + \int \left (- 3 \sec ^{5}{\left (e + f x \right )}\right )\, dx + \int \sec ^{7}{\left (e + f x \right )}\, dx\right ) \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))**3*(c-c*sec(f*x+e))**3,x)
 
output
-a**3*c**3*(Integral(-sec(e + f*x), x) + Integral(3*sec(e + f*x)**3, x) + 
Integral(-3*sec(e + f*x)**5, x) + Integral(sec(e + f*x)**7, x))
 
3.1.24.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (92) = 184\).

Time = 0.23 (sec) , antiderivative size = 244, normalized size of antiderivative = 2.44 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=\frac {a^{3} c^{3} {\left (\frac {2 \, {\left (15 \, \sin \left (f x + e\right )^{5} - 40 \, \sin \left (f x + e\right )^{3} + 33 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{6} - 3 \, \sin \left (f x + e\right )^{4} + 3 \, \sin \left (f x + e\right )^{2} - 1} - 15 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 15 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 18 \, a^{3} c^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 72 \, a^{3} c^{3} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 96 \, a^{3} c^{3} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right )}{96 \, f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^3,x, algorithm="m 
axima")
 
output
1/96*(a^3*c^3*(2*(15*sin(f*x + e)^5 - 40*sin(f*x + e)^3 + 33*sin(f*x + e)) 
/(sin(f*x + e)^6 - 3*sin(f*x + e)^4 + 3*sin(f*x + e)^2 - 1) - 15*log(sin(f 
*x + e) + 1) + 15*log(sin(f*x + e) - 1)) - 18*a^3*c^3*(2*(3*sin(f*x + e)^3 
 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*log(sin(f*x 
 + e) + 1) + 3*log(sin(f*x + e) - 1)) + 72*a^3*c^3*(2*sin(f*x + e)/(sin(f* 
x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) + 96*a^3*c^ 
3*log(sec(f*x + e) + tan(f*x + e)))/f
 
3.1.24.8 Giac [A] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.03 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=\frac {15 \, a^{3} c^{3} \log \left ({\left | \sin \left (f x + e\right ) + 1 \right |}\right ) - 15 \, a^{3} c^{3} \log \left ({\left | \sin \left (f x + e\right ) - 1 \right |}\right ) + \frac {2 \, {\left (33 \, a^{3} c^{3} \sin \left (f x + e\right )^{5} - 40 \, a^{3} c^{3} \sin \left (f x + e\right )^{3} + 15 \, a^{3} c^{3} \sin \left (f x + e\right )\right )}}{{\left (\sin \left (f x + e\right )^{2} - 1\right )}^{3}}}{96 \, f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^3,x, algorithm="g 
iac")
 
output
1/96*(15*a^3*c^3*log(abs(sin(f*x + e) + 1)) - 15*a^3*c^3*log(abs(sin(f*x + 
 e) - 1)) + 2*(33*a^3*c^3*sin(f*x + e)^5 - 40*a^3*c^3*sin(f*x + e)^3 + 15* 
a^3*c^3*sin(f*x + e))/(sin(f*x + e)^2 - 1)^3)/f
 
3.1.24.9 Mupad [B] (verification not implemented)

Time = 16.50 (sec) , antiderivative size = 220, normalized size of antiderivative = 2.20 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^3 \, dx=\frac {5\,a^3\,c^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{8\,f}-\frac {\frac {5\,a^3\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}}{8}-\frac {85\,a^3\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{24}+\frac {33\,a^3\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}+\frac {33\,a^3\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}-\frac {85\,a^3\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{24}+\frac {5\,a^3\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \]

input
int(((a + a/cos(e + f*x))^3*(c - c/cos(e + f*x))^3)/cos(e + f*x),x)
 
output
(5*a^3*c^3*atanh(tan(e/2 + (f*x)/2)))/(8*f) - ((33*a^3*c^3*tan(e/2 + (f*x) 
/2)^5)/4 - (85*a^3*c^3*tan(e/2 + (f*x)/2)^3)/24 + (33*a^3*c^3*tan(e/2 + (f 
*x)/2)^7)/4 - (85*a^3*c^3*tan(e/2 + (f*x)/2)^9)/24 + (5*a^3*c^3*tan(e/2 + 
(f*x)/2)^11)/8 + (5*a^3*c^3*tan(e/2 + (f*x)/2))/8)/(f*(15*tan(e/2 + (f*x)/ 
2)^4 - 6*tan(e/2 + (f*x)/2)^2 - 20*tan(e/2 + (f*x)/2)^6 + 15*tan(e/2 + (f* 
x)/2)^8 - 6*tan(e/2 + (f*x)/2)^10 + tan(e/2 + (f*x)/2)^12 + 1))